import request from '@/utils/request'

const baseUrl = '/system/dict'

export function create(data) {
	return request({
		url: `${baseUrl}`,
		method: 'post',
		data
	})
}

export function findAll(params) {
	return request({
		url: `${baseUrl}`,
		method: 'get',
		params
	})
}

export function findDictByCode(params) {
	return request({
		url: `${baseUrl}/findDictByCode`,
		method: 'get',
		params
	})
}

export function findOne(id) {
	return request({
		url: `${baseUrl}/${id}`,
		method: 'get',
	})
}

export function update(id, data) {
	return request({
		url: `${baseUrl}/${id}`,
		method: 'patch',
		data
	})
}

export function remove(id) {
	return request({
		url: `${baseUrl}/${id}`,
		method: 'delete',
	})
}


